<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Operation_model extends CI_Model {

	public $variable;

	public function __construct()
	{
		parent::__construct();
		
	}
	//添加操作记录数据
	public function add($data){
		if($this->db->insert('operationlog', $data))
		{
			return TRUE;
		}
		else
		{
			return false;
		}
	}

	//获取操作日志
	public function getList($where){
		return $this->db->where($where)->order_by('id','DESC')->limit(50)->get('operationlog')->result_array();
	}
}

/* End of file Operation_model.php */
/* Location: ./application/models/Operation_model.php */